#ifndef __GKOS_INTERRUPT_H
#define __GKOS_INTERRUPT_H

#include "lib/global.h"

#define EFLAGS_IF   0x00000200       // eflags寄存器中的if位为1

enum intrStates{
    INTR_OFF,
    INTR_ON
};

typedef void* IntrHandle; 
extern void InitIdt(void);

enum intrStates intr_set_status(enum intrStates state);
enum intrStates intr_get_status();
enum intrStates EnableIntr(void);
enum intrStates DisableIntr(void);
void RegisterIntrHandler(uint8_t vectorIndex, IntrHandle function);
void DeleteIntrHandler(uint8_t vectorIndex);
void InitGeneralHandler();

#endif